gltf_kun
Graph-based glTF processing library. Uses petgraph to create a traversable graph of the glTF document.
Usage
use ;
let mut graph = default;
// Create a new glTF document within the graph.
let doc = new;
// Create a new scene.
// This `scene` variable is just a wrapper around a u32 index into the graph,
// making it cheap to copy and pass around.
let mut scene = doc.create_scene;
// To read or write data, we need to get the weight.
let weight = scene.get_mut;
weight.name = Some;
// Create a glTF node and add it to the scene.
let mut node = doc.create_node;
scene.add_node;
// Iterate over all scenes in the document, printing their names.
doc.scenes.iter.for_each;
use ;
// Export the document to a GLB byte array.
let glb = export.ok;